<template>
  <!-- <div class="content-box">
  <common-header :title="title"></common-header>-->
  <div class="page-content">
    <van-cell-group>
      <van-cell
        icon="manager"
        title="实名认证"
        value="去认证"
        v-if="!isRealauth"
        is-link
        @click="gotoRealName"
      />
      <van-cell icon="manager" title="实名认证" value="已认证" v-else></van-cell>
      <van-cell icon="lock" title="修改登陆密码" is-link :to="{path:'/user/changePassword'}" />
      <van-cell icon="card" title="修改支付密码" is-link :to="{path:'/user/changePayPassword'}" />
    </van-cell-group>
    <!-- <v-table is-horizontal-resize style="width:100%" :columns="columns" :table-data="tableData"></v-table> -->
    <commonFooter></commonFooter>
  </div>
  <!-- </div> -->
</template>
<script>
import "vue-easytable/libs/themes-base/index.css";
import { commonFooter } from "common";
import { createNamespacedHelpers } from "vuex";
import { openconfApi } from "@/api";
let { mapGetters } = createNamespacedHelpers("user");
export default {
  name: "security",
  components: {
    commonFooter
  },
  computed: {
    ...mapGetters(["isRealauth"])
  },
  methods: {
    gotoRealName() {
      // :to="{path:'/user/realname'}"
      openconfApi({ key: "check_bankchan" }).then(res => {
        if (res.code == 200 && res.data == "new") {
          this.$router.push({ path: "/user/addBankcard" });
        } else {
          this.$router.push({ path: "/user/realname" });
        }
      });
    }
  },
  mounted() {},
  data() {
    return {
      title: "安全设置"
    };
  }
};
</script>
<style lang="less" scoped>
@import "~styles/variable.less";
table {
  border-collapse: collapse;
  width: 100%;
  text-align: center;
  margin: 0.5rem 0;
  font: 0.35rem/1.5 "Microsoft YaHei";
  color: #333;
  background: #fff;
  thead {
    background: #f6f4f5;
  }
  td,
  th {
    min-width: 0.2rem;
    border: 1px #ddd solid;
    max-width: 5rem;
    padding: 0.2rem 0;
    word-wrap: break-word;
    word-break: break-all;
  }
}
</style>